home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
pascal
/
totsrc11.zip
/
TOTFAST.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-05-04
|
59KB
|
2,185 lines
{ Copyright 1991 TechnoJock Software, Inc. }
{ All Rights Reserved }
{ Restricted by License }
{ Build # 1.10 }
Unit totFAST;
{$I TOTFLAGS.INC}
{
Development History:
Mar 15 91 1.00a Changed DesqView checks
May 3 91 1.00b Read Char checks
May 3 91 1.00c Changed virtual write and writeln
Jun 2 91 1.00d Corrected WriteOBJ CRT calls
Jul 10 91 1.00e Corrected WriteCenter method, and CursOff
Nov 06 91 1.00f Real correction of WriteCenter
Feb 05 92 1.00g Corrected cursor restores after saves
}
INTERFACE
uses DOS, CRT, totSYS, totLOOK, totINPUT;
TYPE
StrScreen = string[255]; {alter as necessary}
StrVisible = string[80]; {alter as necessary}
tDirection = (Up, Down, Left, Right, Vert, Horiz);
tCoords = record
X1,Y1,X2,Y2:shortint;
end;
tByteCoords = record
X1,Y1,X2,Y2:byte;
end;
ShadowPosition = (UpLeft,UpRight,DownLeft,DownRight);
WritePtr = ^WriteOBJ;
pWriteOBJ = ^WriteOBJ;
WriteOBJ = object
vWidth: byte; {how wide is screen}
vScreenPtr: pointer; {memory location of screen data}
vWindow: tByteCoords; {active screen area}
vWindowOn: boolean; {is window area active}
vWindowIgnore: boolean; {ignore window settings}
vTempX: byte;
vTempY: byte;
{methods...}
constructor Init;
procedure SetScreen(var P:Pointer; W:byte);
function WindowOff: boolean;
procedure SetWinIgnore(On:Boolean);
procedure WindowOn;
procedure WindowCoords(var Coords: tByteCoords);
function WindowActive: boolean;
function WindowInEffect: boolean;
function WinX: byte;
function WinY: byte;
procedure GetWinCoords(var X1,Y1,X2,Y2:byte);
procedure GetCursorPos;
procedure SetCursorPos;
procedure WriteAT(X,Y,attr:byte;Str:string); VIRTUAL;
procedure WritePlain(X,Y:byte;Str:string); VIRTUAL;
procedure Write(Str:string); VIRTUAL;
procedure WriteLn(Str:string); VIRTUAL;
procedure GotoXY(X,Y: word); VIRTUAL;
function WhereX: word; VIRTUAL;
function WhereY: word; VIRTUAL;
procedure SetWindow(X1,Y1,X2,Y2: byte); VIRTUAL;
procedure ResetWindow; VIRTUAL;
procedure ChangeAttr(X,Y,Att:byte;Len:word); VIRTUAL;
procedure MoveFromScreen(var Source,Dest;Len:Word); VIRTUAL;
procedure MoveToScreen(var Source,Dest; Len:Word); VIRTUAL;
procedure Clear(Att:byte;Ch:char); VIRTUAL;
destructor Done; VIRTUAL;
end; {WriteOBJ}
ScreenPtr = ^ScreenOBJ;
pScreenOBJ = ^ScreenOBJ;
ScreenOBJ = object
vWidth: byte; {how wide is screen}
vDepth: byte; {how many lines}
vScreenPtr: pointer; {memory location of screen data}
vCursX: byte; {cursor location}
vCursY: byte; { -"- }
vCursTop: byte; {cursor size}
vCursBot: byte; { -"- }
oWritePtr: WritePtr; {screen writing and moving object}
vHiMarker: char; {character to indicate attribute change}
vVisible: boolean; {is the screen mapped to visible display}
vOnScreen:boolean;
{methods...}
constructor Init;
procedure SetHiMarker(M:char);
function HiMarker:char;
procedure AssignWriteOBJ(var Wri: WriteOBJ);
procedure SetWindow(X1,Y1,X2,Y2: byte);
procedure SetWinIgnore(On:Boolean);
procedure ResetWindow;
function WindowOff:boolean;
procedure WindowOn;
procedure WindowCoords(var Coords: tByteCoords);
function WindowActive: boolean;
function OnScreen:boolean;
function CharHeight: integer;
procedure CursReset;
procedure CursSave;
procedure GotoXY(X,Y: word);
procedure CursSize(T,B: byte);
function WhereX: word;
function WhereY: word;
function CursTop: byte;
function CursBot: byte;
procedure CursHalf;
procedure CursFull;
procedure CursOn;
procedure CursOff;
procedure Exists;
procedure MoveToScreen(var Source, Dest; Length:word);
procedure MoveFromScreen(var Source, Dest; Length:word);
procedure Save;
procedure Create(X,Y,Attr:byte);
function Width: byte;
function Depth: byte;
function ScreenPtr: pointer;
procedure Display;
procedure PartDisplay(X1,Y1,X2,Y2,X,Y:byte);
procedure PartSlideDisplay(X1,Y1,X2,Y2:byte;Way:tDirection);
procedure SlideDisplay(Way: tDirection);
procedure PartSave (X1,Y1,X2,Y2:byte; VAR Dest);
procedure PartRestore (X1,Y1,X2,Y2:byte; VAR Source);
procedure CopyScreenBlock(X1,Y1,X2,Y2,X,Y:byte);
procedure MoveScreenBlock(X1,Y1,X2,Y2,X,Y:byte);
procedure Scroll(Way:tDirection;X1,Y1,X2,Y2:byte);
procedure Write(Str:string);
procedure WriteLn(Str:string);
procedure WriteAT(X,Y,attr:byte;Str:string);
procedure WriteHi(X,Y,AttrHi,Attr:byte;Str:string);
procedure WritePlain(X,Y:byte;Str:string);
procedure WriteCap(X,Y,AttrCap,Attr:byte;Str:string);
procedure WriteClick(X,Y,attr:byte;Str:string);
procedure WriteCenter(Y,Attr:byte;Str:string);
procedure WriteBetween(X1,X2,Y,Attr:byte;Str:string);
procedure WriteRight(X,Y,Attr:byte;Str:string);
procedure WriteVert(X,Y,Attr:byte;Str:string);
procedure Attrib(X1,Y1,X2,Y2,Attr:byte);
procedure Clear(Att:byte;Ch:char);
procedure PartClear(X1,Y1,X2,Y2,Att:byte;Ch:char);
procedure ClearText(X1,Y1,X2,Y2:byte);
procedure ReadWord(X,Y:byte;var Attr:byte; var Ch : char);
function ReadChar(X,Y:byte):char;
function ReadAttr(X,Y:byte):byte;
function ReadStr(X1,X2,Y:byte):string;
procedure BoxEngine(X1,Y1,X2,Y2,LeftPad,RightPad,Battr,Tattr,Mattr,style:byte;
Filled:boolean;
Title:string);
procedure TitleEngine(X1,Y1,X2,Y2,LeftPad,RightPad,Battr,Tattr:byte;Str,Title:string);
procedure Box(X1,Y1,X2,Y2,attr,style:byte);
procedure FillBox(X1,Y1,X2,Y2,attr,style:byte);
procedure ShadFillBox(X1,Y1,X2,Y2,attr,style:byte);
procedure TitledBox(X1,Y1,X2,Y2,Battr,Tattr,Mattr,style:byte;Title:string);
procedure HorizLine(X1,X2,Y,Attr,Style : byte);
procedure VertLine(X,Y1,Y2,Attr,Style:byte);
procedure SmartVertLine(X,Y1,Y2,Attr,Style:byte);
procedure SmartHorizLine(X1,X2,Y,Attr,Style:byte);
procedure WriteHScrollBar(X1,X2,Y,Attr: byte; Current,Max: longint);
procedure WriteVScrollBar(X,Y1,Y2,Attr: byte; Current,Max: longint);
destructor Done;
end; {ScreenOBJ}
pScrollOBJ = ^ScrollOBJ;
ScrollOBJ = object
vUpArrowChar: char;
vDownArrowChar: char;
vLeftArrowChar: char;
vRightArrowChar: char;
vElevatorChar: char;
vBackgroundChar: char;
{methods...}
constructor Init;
procedure SetDefaults;
procedure SetScrollChars(U,D,L,R,E,B:char);
function UpChar: char;
function DownChar: char;
function LeftChar: char;
function RightChar: char;
function ElevatorChar: char;
function BackgroundChar: char;
destructor Done;
end; {ScrollOBJ}
pShadowOBJ = ^ShadowOBJ;
ShadowOBJ = object
vShadPos: ShadowPosition; {where is shadow}
vShadAttr: byte; {shadow attribute}
vShadChar: char; {shadow character - ' ' is see-through}
vShadWidth: byte; {shadow width in characters}
vShadDepth: byte; {shad